﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using XMLGener.Utils;

namespace XMLGener.Data
{
    /// <summary>
    /// 
    /// </summary>
    public class XMLGenerElementTypes:XMLGenerNode
    {/*
        private static XDataTypeCollection baseTypesList = null;

        /// <summary>
        ///  Funcion initialize base data types.
        /// </summary>
        /// <param name="typesElement"></param>
        public static void loadBaseDataTypes(XmlElement typesElement)
        {
            XDataTypeCollection list = new XDataTypeCollection();
            XmlElement node = XMLUtils.getSubElement(typesElement, XMLGenerNode.XDATATYPE_STR);
            while (node != null)
            {

                list.Add(new XDataType(node));
                node = XMLUtils.getNextElement(node, XMLGenerNode.XDATATYPE_STR);
            }
            baseTypesList = list;
        }

        public static XDataTypeCollection getDefaultTypes()
        {
            return baseTypesList;
        }*/



        /// <summary>
        /// 
        /// </summary>
        /// <param name="xmlElem"></param>
        public XMLGenerElementTypes(XmlElement xmlElem)
            : base(null, xmlElem)
        {
            this.xtype = XNodeType.ELEMENTTYPES;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="parent"></param>
        public XMLGenerElementTypes(XMLGenerNode parent)
            : base(XMLGenerNode.XTYPES_STR, parent)
        {
            this.xtype = XNodeType.ELEMENTTYPES;
           
        }
        /// <summary>
        /// 
        /// </summary>
        protected override void defaultInitialization()
        {
            base.defaultInitialization();
            this.nodeTypeStr = XMLGenerNode.XTYPES_STR;
        }

        //---------------------------
        // attributes from xml
        //---------------------------

        /// <summary>
        /// 
        /// </summary>
        public override String name
        {
            get { return "Element types"; }
            set { ; }
        }


    }
}
    